Python Web Penetration Testing Cookbook by 2015

Python Web Penetration Testing Cookbook by 2015

Author:2015
Language: eng
Format: epub, mobi
Publisher: Packt Publishing


Fingerprinting servers through HTTP headers

The next part of the HTTP protocol that we will be concentrating on are the HTTP headers. Found in both the requests and responses from the web server, these carry extra information between the client and server. Any area with extra data makes a great place to parse information about the servers and to look for potential issues.

How to do it…

The following is a simple header grabbing script that will parse the response headers in an attempt to identify the web server technology in use:

import requests req = requests.get('http://packtpub.com') headers = ['Server', 'Date', 'Via', 'X-Powered-By', 'X-Country-Code'] for header in headers: try: result = req.headers[header] print '%s: %s' % (header, result) except Exception, error: print '%s: Not found' % header



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.